package com.ysc;

import com.ysc.domain.Student;
import com.ysc.utils.mybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.io.IOException;

public class test3 {

    public static void main(String[] args) throws IOException {
        SqlSession sqlSession = mybatisUtils.getSqlSession();
        String Sqlid = "com.ysc.dao.StudentDao.deleteStudent";
        Student stu = new Student();
        stu.setId(5);
        int Nums = sqlSession.delete(Sqlid,stu);
        //studentList.forEach(student -> System.out.println(student));
        System.out.println(Nums+"个学生已删除！");
        sqlSession.commit();
        sqlSession.close();
    }
}
